package net.lanelife.casino.cms.web.controller;

import javax.servlet.http.HttpSession;

import net.lanelife.casino.caipiao.service.api.IUserService;
import net.lanelife.casino.common.web.resolver.ViewResolver;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value="/")
public class HomeController {
	
	@Autowired
	private IUserService userService;
	
	@RequestMapping(value={"/","/index.html"})
	public String home(HttpSession session) {
		System.out.println(session.getId());
		System.out.println(userService.find(1).getUserName());
		return ViewResolver.getView("index");
	}

}
